package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_discover_resources;

//DAO
public interface U_discover_resourcesMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_DISCOVER_RESOURCES  WHERE ID = #{id}")
	public ApiU_discover_resources findU_discover_resourcesById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_discover_resources")
	public List<ApiU_discover_resources> findU_discover_resourcess();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_discover_resourcessByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_DISCOVER_RESOURCES (CONN_ID, RESOURCES_TYPE, RESOURCES, SORT, TYPE) VALUES (#{conn_id}, #{resources_type}, #{resources}, #{sort}, #{type})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_discover_resources(ApiU_discover_resources u_discover_resources);

	// 修改
	@Update("UPDATE U_DISCOVER_RESOURCES SET CONN_ID = #{conn_id}, RESOURCES_TYPE = #{resources_type}, RESOURCES = #{resources}, SORT = #{sort}, TYPE = #{type} WHERE ID = #{id}")
	public int updateU_discover_resources(ApiU_discover_resources u_discover_resources);

	// 删除
	@Delete("DELETE FROM U_DISCOVER_RESOURCES  WHERE ID = #{id}")
	public int deleteU_discover_resources(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
